package com.woniu.mapper;

import com.woniu.entity.Account;
import com.woniu.vo.AccountVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface AccountMapper extends Mapper<Account> {

    /**
     * 修改时的重名验证 ，需要sql语句
     *
     * @param accountName
     * @param accountId
     * @return
     * @throws Exception
     */
    Account selectAccountByNameAndId(@Param("accountName") String accountName, @Param("accountId") Integer accountId) throws Exception;

    /**
     * 批量重置用户的密码
     *
     * @param list
     * @return
     * @throws Exception
     */
    int updatePasswordByIds(List<Account> list) throws Exception;
    //商户——用户管理
    List<AccountVo> selectAccountByMerchant(String accountName,String startTime,String endTime,Integer isDelete);

    /**
     * @return
     * @Author zgc
     * @Description  查询用户消费排行
     * @Param
     * params
     **/
    List<AccountVo> selectAccountByTotal();
}